package com.jm.jisho;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;

public class OCRScanActivity extends Activity {
    /** Called when the activity is first created. */
   @Override
   public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.ocrscan_layout);
       
       // Dashboard Events button
       ImageButton btn_language_swap = (ImageButton) findViewById(R.id.capture_btn_swapLang);
       
       // Listening to News Feed button click
       btn_language_swap.setOnClickListener(new View.OnClickListener() {

           @Override
           public void onClick(View view) {
        	   Button btn_fromLang = (Button) findViewById(R.id.capture_btn_fromLang);
        	   Button btn_ToLang = (Button) findViewById(R.id.capture_btn_toLang);

        	   if(btn_fromLang.getText().toString().equals("English"))
        	   {
        		   // TODO Setting Changed to Japanese
        		   btn_fromLang.setText("Japanese");
        		   btn_ToLang.setText("English");
        	   } else {
        		   // TODO Setting Changed to English        		   
        		   btn_fromLang.setText("English");
        		   btn_ToLang.setText("Japanese");
        	   }
           }
       });
       
   }
}
